from flask import Flask
from cons import Config
#导入sqlalcmy
from flask_sqlalchemy import SQLAlchemy
#迁移的包
from flask_migrate import Migrate,MigrateCommand
#执行脚本的包
from flask_script import Manager,Shell
app = Flask(__name__)
app.config.from_json(Config)
#初始化
db =SQLAlchemy(app)
#实例化mange
manage = Manager(app)
#实例化migrate
migrate = Migrate(app,db)
manage.add_command("db")

#orm方式创建:学生表,id,name,age
class User(db.Model):
    __tablename__='users'
    id = db.Column(db.Integer,primay_key=True,autoincrement=True),
    name =db.Column(db.String(50),defult='')
    age =db.Column(db.Integer,default=0)

if __name__ =='__main__':
    app.run